package com.yymmarket.forum.user;

public class UserService {

	
	private static UserService userService;

	private UserService() {
	}

	public static UserService getInstance() {
		if (userService == null) {
			synchronized (UserService.class) {
				if (userService == null)
					userService = new UserService();
			}
		}
		return userService;
	}
	
	private UserDAO userDAO = new UserDAO();
	
	public boolean addUser(UserBean bean) {
		return this.userDAO.addUser(bean);
	}
	
	public boolean deleteUser(String account) {
		return this.userDAO.deleteUser(account);
	}
	
	public UserBean getUserByAccount(String account) {
		return this.userDAO.getUserByAccount(account);
	}
	
	public UserBean getUserById(int id) {
		return this.userDAO.getUserById(id);
	}
}
